package com.gage.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.gage.model.BsDepartment;
import com.gage.model.BsDepartmentUser;

public interface BsDepartmentMapper extends BaseMapper<BsDepartment>  {

    int insertSelective(BsDepartment record);
    BsDepartment selectDepartmentById(Integer id);
    int insertDepartmentUser(BsDepartmentUser bsDepartmentUser);
    Integer getCountChild(@Param("parentid") Integer parentid);
    List<Map<String, Object>> selectDepartmentByKeyword(Pagination page, Map<String, Object> params);
    List<BsDepartment> selectDepartmentTreeByGradeOrPid(@Param("grade")Integer grade,@Param("parentid")Integer parentid);
    List<Map<String, Object>> getDepartmentUserByDepartmentId(Pagination page, Map<String, Object> params);
    List<Map<String, Object>> selectAssignUserPage(Pagination page, Map<String, Object> params);
}